
#include <stdio.h>
#include <time.h>
#include <sys/time.h>

int main()
{
	struct timeval tv;
	struct timezone tz;

	if (gettimeofday(&tv, &tz) < 0) {
		perror("Failed to get time of day");
		return -1;
	}
	else {
		printf("%s %ld\n", ctime(&tv.tv_sec), tv.tv_usec);
	}

	return 0;
}

